<?php
/**
 * Created by PhpStorm.
 * User: Gooraye
 * Date: 2016-10-13
 * Time: 10:48
 */

function getImgUrl($id,$size=0){
    return C('PICTURE_REMOTE_URL').$id.($size?'&size='.$size:'');
}


//生成随机字符串

function createRandomStr($length){
    $str = array_merge(range(0,9),range('a','z'),range('A','Z'));
    shuffle($str);
    $str = implode('',array_slice($str,0,$length));
    return $str;
}